#include<stdio.h>
int main()
{
    char ch;
    int i,letter=0,blank,digit,other;
    for(i=1;i<10;i++)
    {
        scanf("%c",&ch);
        if((ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z'))
        	letter++;
        else if(ch==' '||ch=='\n')
        	blank++;
        else if(ch>='0'&&ch<='9')
        	digit++;
        else 
			other++;
    }
printf("letter = %d, blank = %d, digit = %d, other = %d",letter,blank,digit,other);
return 0;
}
